﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SolverLibrary.Data_Entities
{
    public interface Board
    {
        /// <summary>
        /// Get the specified item at the given index of the board.
        /// Implementers of this interface are free to chose how they
        /// implement this method if they are a two dimensional board.
        /// </summary>
        /// <typeparam name="T">The type of items on the board</typeparam>
        /// <param name="i">The index from which to return the item</param>
        /// <returns>The item at the specified index.</returns>
        Item get(int i);

        /// <summary>
        /// Get the specified item at the row and column of the board.
        /// Implementers of this interface are free to chose how they
        /// implement the menthod if they are a one dimensional board.
        /// </summary>
        /// <typeparam name="T">The type of items on the board</typeparam>
        /// <param name="i">The column from which to return the item.</param>
        /// <param name="j">The row from which to return the item</param>
        /// <returns></returns>
        Item get(int x, int y);

        /// <summary>
        /// Get the entire board as a two dimensional matrix.
        /// </summary>
        /// <typeparam name="T">The type of items on the board</typeparam>
        /// <returns>The entire board as a two dimensional matrix.</returns>
        int[,] getTwoDimensional();

        /// <summary>
        /// Get the entire board as a one dimensional matrix.
        /// </summary>
        /// <typeparam name="T">The type of items on the board</typeparam>
        /// <returns>The entire board as a one dimensional matrix.</returns>
        int[] getOneDimensional();

    }
}
